package com.hl.service;

import com.hl.mapper.UserReviewMapper;
import com.hl.pojo.UserReview;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserReviewServiceImpl implements UserReviewService {
    @Autowired
    private UserReviewMapper userReviewMapper;

    @Override
    public Integer add(UserReview userReview) {
        return userReviewMapper.add(userReview);
    }

    @Override
    public Integer update(UserReview userReview) {
        return userReviewMapper.update(userReview);
    }

    @Override
    public Integer delete(Integer id) {
        return userReviewMapper.delete(id);
    }

    @Override
    public UserReview findById(Integer id) {
        return userReviewMapper.findById(id);
    }

    @Override
    public List<UserReview> findByUserId(Integer userId) {
        return userReviewMapper.findByUserId(userId);
    }

    @Override
    public List<UserReview> findAll() {
        return userReviewMapper.findAll();
    }

    @Override
    public List<UserReview> findByConsultantId(Integer consultantId) {
        return userReviewMapper.findByConsultantId(consultantId);
    }
}
